﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Itfort.UserCenter
{
	/// <summary>
	/// 错误码。
	/// </summary>
	public class ErrorCode
	{
		/// <summary>
		/// 错误代码。
		/// </summary>
		public String Code { get; set; }

		/// <summary>
		/// 错误描述。
		/// </summary>
		public String Description { get; set; }
	}

	/// <summary>
	/// 
	/// </summary>
	public static class ErrorCodes
	{
		/// <summary>
		/// 无效的用户名。
		/// </summary>
		public static readonly ErrorCode InvalidUserName
			= new ErrorCode() { Code = "UC001", Description = "无效的用户名" };

		/// <summary>
		/// 无效的密码。
		/// </summary>
		public static readonly ErrorCode InvalidPassword
			= new ErrorCode() { Code = "UC002", Description = "无效的密码" };

		/// <summary>
		/// 无效的电子邮箱。
		/// </summary>
		public static readonly ErrorCode InvalidEmail
			= new ErrorCode() { Code = "UC003", Description = "无效的电子邮箱" };

		/// <summary>
		/// 无效的手机号码。
		/// </summary>
		public static readonly ErrorCode InvalidMobile
			= new ErrorCode() { Code = "UC004", Description = "无效的手机号码" };

		/// <summary>
		/// 用户名已存在。
		/// </summary>
		public static readonly ErrorCode UserNameAlreadyExists
			= new ErrorCode() { Code = "UC005", Description = "用户名已存在" };

		/// <summary>
		/// 电子邮箱已存在。
		/// </summary>
		public static readonly ErrorCode EmailAlreadyExists
			= new ErrorCode() { Code = "UC006", Description = "电子邮箱已存在" };

		/// <summary>
		/// 手机号码已存在。
		/// </summary>
		public static readonly ErrorCode MobileAlreadyExists
			= new ErrorCode() { Code = "UC007", Description = "手机号码已存在" };

		/// <summary>
		/// 登陆名或密码错误。
		/// </summary>
		public static readonly ErrorCode LoginNameOrPasswordError
			= new ErrorCode() { Code = "UC008", Description = "登陆名或密码错误" };

		/// <summary>
		/// 不支持通过电子邮箱登陆。
		/// </summary>
		public static readonly ErrorCode NotSupportedLoginViaEmail
			= new ErrorCode() { Code = "UC009", Description = "不支持通过电子邮箱登陆" };

		/// <summary>
		/// 不支持通过手机号码登陆。
		/// </summary>
		public static readonly ErrorCode NotSupportedLoginViaMobile
			= new ErrorCode() { Code = "UC010", Description = "不支持通过手机号码登陆" };


	}
}
